Add agent-scoped MCP repo tools and dispatch-dev#58
Merged
Conversation
- Agent-scoped MCP route (POST /api/mcp/:agentId) resolves repo context from the agent's cwd and serves repo-specific project.* tools alongside built-in tools (worktree, PR management) - Repo tool manifest loaded from .dispatch/tools.json with project.* namespace enforcement and command-backed execution - Codex launch injects agent-scoped MCP URL via -c flag - Claude launch injects agent-scoped MCP URL via --mcp-config with correct mcpServers wrapper format - Standalone bin/dispatch-dev script: auto-selects free ports, starts isolated Postgres + API server + optional Vite, persists state to /tmp, supports up/down/restart/status/logs/url commands - dispatch-dev flags: --vite, --live (tmux runtime), --no-db, --suffix, --cwd, --follow; restart preserves flags from previous state - Hardening: early crash detection, node preflight check, stale state cleanup, graceful shutdown with SIGKILL fallback - Aligned AGENTS.md and CLAUDE.md to describe dispatch-dev workflow - Tests for repo tool loading, agent launch commands, and full dispatch-dev lifecycle (up/status/url/logs/down) Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
Unset npm_config_prefix before sourcing nvm in dispatch-dev subshells. GitHub Actions' setup-node sets this variable, which nvm rejects. Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
Subshells inherit the parent environment — node/npm are already on PATH. nvm was only needed in the old script which launched bare tmux windows. Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
POST /api/mcp/:agentId) that resolves repo context from the agent's working directory and serves repo-specificproject.*tools from.dispatch/tools.jsonalongside built-in MCP toolsbin/dispatch-dev— standalone dev-stack helper that auto-selects free ports and starts isolated Postgres + API + optional Vite with state persistence in/tmpand full lifecycle commands (up/down/restart/status/logs/url)mcpServerswrapper) and wires both Codex and Claude launch commands to inject the agent-scoped MCP URLdispatch-devworkflowTest plan
npm run check— type checking passesnpm test— 49 unit tests pass (including new repo-tools, agent-manager, and dispatch-dev lifecycle tests)npm run test:e2e— 25 Playwright tests pass🤖 Generated with Claude Code